<?php 
@header('Content-Type: text/html; charset=UTF-8');
if($islogin2==1){}else exit("<script language='javascript'>window.location.href='./login.php';</script>");
if($userrow['active']==0){
	sysmsg('由于你的商户违反相关法律法规与《'.$conf['web_name'].'用户协议》，已被禁用！');
}
if ($conf['safe_switch'] == 1){
    if (!empty($userrow['safecode'])){
        if ($islogin3 == 1){}else{
            @header('Content-Type: text/html; charset=UTF-8');
            exit("<script language='javascript'>alert('需要安全码二次验证！');window.location.href='safe.php';</script>");
        }
    }
}
$uid=$rs=$DB->query("select * from pay_user WHERE name={$pid}");
 foreach($uid as $res){
 $usid=$res['id'];
}
$title='商户后台';
$yoursendtime=date('Y-m-d H:i:s',$userrow['level_endtime']);
$numrows=$DB->query("SELECT count(*) from pay_cement WHERE `active` = 0")->fetchColumn();
$rs=$DB->query("SELECT * FROM `pay_cement` WHERE `active` = 0 order by id desc limit 3")->fetchAll();
$inviter=$DB->query("SELECT * FROM pay_invite WHERE uid={$usid} order by id desc limit 3")->fetchAll();
$invite=$DB->query("SELECT * from pay_invite WHERE uid={$usid}")->rowCount();
?>
<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
  <meta name="description" content="<?php echo $conf['copyright']?>"/>
  <meta name="author" content="<?php echo $conf['web_desc']?>"/>
  <title><?php echo $conf['web_name']?>|商户后台</title>
  <link rel="icon" href="../favicon.ico" type="image/x-icon">
  <link href="/user/kuyun/plugins/vectormap/jquery-jvectormap-2.0.2.css" rel="stylesheet"/>
  <link href="/user/kuyun/plugins/simplebar/css/simplebar.css" rel="stylesheet"/>
  <link href="/user/kuyun/css/bootstrap.min.css" rel="stylesheet"/>
  <link href="/user/kuyun/css/animate.css" rel="stylesheet" type="text/css"/>
  <link href="/user/kuyun/css/icons.css" rel="stylesheet" type="text/css"/>
  <link href="/user/kuyun/css/sidebar-menu.css" rel="stylesheet"/>
  <link href="/user/kuyun/css/app-style.css" rel="stylesheet"/>
  <link rel="stylesheet" href="/user/kuyun/bootstrap.css" type="text/css" />
  <link rel="stylesheet" href="/user/kuyun/layer/skin/layer.css">
 <script type="text/javascript" src="/user/kuyun/js/jquery-1.7.2.min.js"></script>
 <script src="/user/kuyun/lib/layui/layui.js" charset="utf-8"></script>
</head>
<body>
   <div id="pageloader-overlay" class="visible incoming"><div class="loader-wrapper-outer"><div class="loader-wrapper-inner" ><div class="loader"></div></div></div></div>
 <div id="wrapper">
   <div id="sidebar-wrapper" data-simplebar="" data-simplebar-auto-hide="true">
     <div class="brand-logo">
      <a href="./">
       <img src="/user/kuyun/images/logo-icon.png" class="logo-icon" alt="logo icon">
      <h5 class="logo-text"><?php echo $title;?></h5>
     </a>
   </div>
   <div class="user-details">
      <div class="media align-items-center user-pointer collapsed" data-toggle="collapse" data-target="#user-dropdown">
        <div class="avatar">
       <img class="mr-3 side-user-img" src="<?php echo ($userrow['qq'])?'//q2.qlogo.cn/headimg_dl?bs=qq&dst_uin='.$userrow['qq'].'&src_uin='.$userrow['qq'].'&fid='.$userrow['qq'].'&spec=100&url_enc=0&referer=bu_interface&term_type=PC':'assets/img/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg'?>" alt="user avatar">
        </div>
         <div class="media-body">
         <h6 class="side-user-name">基本信息</h6>
        </div>
       </div>
       <div id="user-dropdown" class="collapse">
          <ul class="user-setting-menu">
            <li><a href="user.php"><i class="icon-user"></i> 账号信息</a></li>
            <li><a href="userinfo.php"><i class="icon-settings"></i> 收款设置</a></li>
            <?php if($conf['settle_open']==1){?>
          <li><a href="apply.php"><i class="icon-folder-alt"></i> 申请提现</a></li>   
          <?php }  ?>
           <li><a href="userlog.php"><i class="icon-info"></i> 登入记录</a></li>  
          </ul>
       </div>
      </div>
   <ul class="sidebar-menu do-nicescrol">
      <li class="sidebar-header">主要导航</li>
      <li>
        <a href="userge.php" class="waves-effect">
          <i class="zmdi zmdi-chart icon-volume-2"></i> <span>商户公告</span>
         <small class="badge float-right badge-danger">New</small>
        </a>
       </li>
        <li>
        <a href="paihan.php" class="waves-effect">
          <i class="zmdi zmdi-chart icon-chart"></i> <span>商户排行</span>
           <i class="fa fa-angle-left float-right"></i>
        </a>
       </li>
      <li>
        <a href="javaScript:void();" class="waves-effect">
          <i class="zmdi zmdi-view-dashboard fa icon-menu"></i> <span>订单管理</span>
          <i class="fa fa-angle-left pull-right"></i>
        </a>
        <ul class="sidebar-submenu">
          <li><a href="order.php"><i class="zmdi zmdi-long-arrow-right"></i>订单信息</a></li>
          <li><a href="settle.php"><i class="zmdi zmdi-long-arrow-right"></i>结算信息</a></li>
          
        </ul>
      </li>
      <li>
       <a href="test.php" class="waves-effect">
          <i class="zmdi zmdi-calendar-check icon-social-skype "></i> <span>支付DEMO</span>
          <i class="fa fa-angle-left pull-right"></i>
        </a>
        
      </li>
        <li>
        <a href="javaScript:void();" class="waves-effect">
          <i class="zmdi zmdi-card-travel icon-people"></i>
          <span>商户转账</span>
        <small class="badge float-right badge-warning">转</small>
       
        </a>
        <ul class="sidebar-submenu">
          <li><a href="Transfer.php"><i class="zmdi zmdi-long-arrow-right"></i>商户转账</a></li>
          <li><a href="records.php"><i class="zmdi zmdi-long-arrow-right"></i>转账记录</a></li>
         
        </ul>
      </li>
      <li>
        <a href="javaScript:void();" class="waves-effect">
          <i class="zmdi zmdi-card-travel icon-share-alt"></i>
          <span>邀请返利</span>
       <i class="fa fa-angle-left pull-right"></i>
       
        </a>
        <ul class="sidebar-submenu">
          <li><a href="invite.php"><i class="zmdi zmdi-long-arrow-right"></i>邀请推广</a></li>
          <li><a href="invitelog.php"><i class="zmdi zmdi-long-arrow-right"></i>邀请记录</a></li>
         
        </ul>
      </li>
      
       <li>
        <a href="javaScript:void();" class="waves-effect">
          <i class="zmdi zmdi-invert-colors icon-cloud-download"></i> <span>SDK集成包</span>
        </a>
        <ul class="sidebar-submenu">
          <li><a href="../index/doc/"><i class="zmdi zmdi-long-arrow-right"></i> 接口文档</a></li>
          <li><a href="demo.php"><i class="zmdi zmdi-long-arrow-right"></i>集成包下载</a></li>
        
        </ul>
      </li>   
    </ul>
   </div>
<header class="topbar-nav">
 <nav class="navbar navbar-expand fixed-top">
  <ul class="navbar-nav mr-auto align-items-center">
    <li class="nav-item">
      <a class="nav-link toggle-menu" href="javascript:void();">
       <i class="icon-menu menu-icon"></i>
     </a>
    </li>
  </ul>
     
  <ul class="navbar-nav align-items-center right-nav-link">
    <li class="nav-item dropdown-lg">
      <a class="nav-link dropdown-toggle dropdown-toggle-nocaret waves-effect" data-toggle="dropdown" href="javascript:void();">                
      <i class="fa fa-envelope-open-o"></i><span class="badge badge-light badge-up"><?php echo $numrows?></span></a>
      <div class="dropdown-menu dropdown-menu-right">
        <ul class="list-group list-group-flush">
         <li class="list-group-item d-flex justify-content-between align-items-center">
         商户公告信息
          <span class="badge badge-light"><?php echo $numrows?></span>
          </li>
       <li class="list-group-item">
          <a href="javaScript:void();">
           <div class="media">
            <?php
               foreach ($rs as $row){ ?>
            <i class="zmdi zmdi-notifications-active fa-2x mr-3 text-danger"></i>
            <div class="media-body">
            <h6 class="mt-0 msg-title"><?php echo $row['title'];?></h6>
            <p class="msg-info"><?php echo mb_substr($row['content'], 0, 30, 'utf-8')?>.........</p>
            <small><?php echo $row['time'];?></small>
            </div>
           <?php  }?>
          </div>
          </a>
          </li>
          <li class="list-group-item text-center"><a href="userge.php">查看所有公告信息</a></li>
        </ul>
        </div>
    </li>
    <li class="nav-item dropdown-lg">
      <a class="nav-link dropdown-toggle dropdown-toggle-nocaret waves-effect" data-toggle="dropdown" href="javascript:void();">
    <i class="fa fa-bell-o"></i><span class="badge badge-info badge-up"><?php echo $invite;?></span></a>
      <div class="dropdown-menu dropdown-menu-right">
        <ul class="list-group list-group-flush">
          <li class="list-group-item d-flex justify-content-between align-items-center">
          邀请注册信息
          <span class="badge badge-info"><?php echo $invite;?></span>
          </li>
          <?php
               foreach ($inviter as $row){ ?>
          <li class="list-group-item">
          <a href="javaScript:void();">
           <div class="media">
             <i class="zmdi zmdi-accounts fa-2x mr-3 text-info"></i>
            <div class="media-body">
            <h6 class="mt-0 msg-title">新邀请注册ID:[<?php echo $row['pid'];?>]</h6>
            <p class="msg-info">已经返利<?php echo $row['money'];?>元至您商户余额请查收</p>
            <p class="user-subtitle">注册时间：<?php echo $row['time'];?></p>
            </div>
          </div>
          </a>
          </li>
          <?php }?>
          <li class="list-group-item text-center"><a href="invitelog.php">查看更多返利记录</a></li>
        </ul>
      </div>
    </li>
    <li class="nav-item">
      <a class="nav-link dropdown-toggle dropdown-toggle-nocaret" data-toggle="dropdown" href="#">
        <span class="user-profile">
        <img class="img-circle" src="<?php echo ($userrow['qq'])?'//q2.qlogo.cn/headimg_dl?bs=qq&dst_uin='.$userrow['qq'].'&src_uin='.$userrow['qq'].'&fid='.$userrow['qq'].'&spec=100&url_enc=0&referer=bu_interface&term_type=PC':'assets/img/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg'?>" alt="user avatar">
         </span>
      </a>
      <ul class="dropdown-menu dropdown-menu-right">
       <li class="dropdown-item user-details">
        <a href="javaScript:void();">
           <div class="media">
             <div class="avatar">
             <img class="align-self-start mr-3" src="<?php echo ($userrow['qq'])?'//q2.qlogo.cn/headimg_dl?bs=qq&dst_uin='.$userrow['qq'].'&src_uin='.$userrow['qq'].'&fid='.$userrow['qq'].'&spec=100&url_enc=0&referer=bu_interface&term_type=PC':'assets/img/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg'?>" alt="user avatar"></div>
            <div class="media-body">
            <?php if($userrow['level']==2){?>
                <h6 class="mt-2 user-title">黄金会员:<?php echo $pid;?></h6>
                <p class="user-subtitle">会员到期时间：<?php echo $yoursendtime ?></p>
                <?php } elseif($userrow['level']==3){?>
                <h6 class="mt-2 user-title">钻石会员:<?php echo $pid;?></h6>
                <p class="user-subtitle">会员到期时间：<?php echo $yoursendtime ?></p>
                <?php } else{?>
                <h6 class="mt-2 user-title">普通会员:<?php echo $pid;?></h6>
                <p class="user-subtitle">会员到期时间：<?php echo $yoursendtime ?></p>
                <?php }?>     
            </div>
           </div>
          </a>
        </li>
        <li class="dropdown-divider"></li>
        <li class="dropdown-item"><i class="icon-arrow-up-circle mr-2"></i><a href="user.php?act=getvip"> 升级会员</a></li>
        <li class="dropdown-divider"></li>
        <li class="dropdown-item"><i class="icon-wallet mr-2"></i><a href="user.php"> 账号信息</a></li>
        <li class="dropdown-divider"></li>
        <li class="dropdown-item"><i class="icon-settings mr-2"></i><a href="userinfo.php"> 收款设置</a></li>
        <li class="dropdown-divider"></li>
        <li class="dropdown-item"><i class="icon-power mr-2"></i><a href="login.php?logout"> 安全退出</a></li>
      </ul>
    </li>
  </ul>
</nav>
</header>
   </div>
    <a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i> </a>

  <!--本程序由余生网络信息开发，作者：余生 QQ：2316803263-->